package com.kongge.viewdisplayframeworklib.view;

import android.content.Context;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.kongge.viewdisplayframeworklib.R;
import com.kongge.viewdisplayframeworklib.sdk.LifeCircleInter;

/**
 * Created by kongge on 2017/11/17.
 * description:
 * layoutid:
 */
public abstract class TabHexinView extends RelativeLayout implements LifeCircleInter, TabWidget.TabListener {

    protected NavigateBar mNavigateBar;
    protected ViewGroup pageContent;
    protected TabWidget tabCtrl;

    public TabHexinView(Context context) {
        super(context);
    }

    public TabHexinView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        mNavigateBar = (NavigateBar) findViewById(R.id.page_title_bar);
        pageContent = (ViewGroup) findViewById(R.id.page_content);
        tabCtrl = (TabWidget) findViewById(R.id.bottom_tabbar);
        tabCtrl.setTabListener(this);
    }

    @Override
    public void onClick(int oldIndex, int newIndex) {
        // TODO Auto-generated method stub
        onTabBarClick(oldIndex, newIndex);
    }


}
